﻿//------------------------------------------------------------------------------
// ╭─────────────────────────────╮
// │ ╭─╮     ╭─╮              TM │   ╠═╬═╬═╬═╬═╬═╬═╬═╬═╬═╬═╬═╬═╬═╬═╬═╬═╬═╬═╬═╬═╣
// │ │ │     │ │                 │                                           ☺  
// │ │ ╰───╮ │ │ ╭─────╮ ╭─────╮ │     Name:Wedn.Net 路由配置节点解析     ♮ ♪ ♩
// │ │ ╭─╮ │ │ │ │ ╭─╮ │ │ ╭─╮ │ │                                    ♫ ♭      
// │ │ ╰─╯ │ │ │ │ ╰─╯ │ │ ╰─╯ │ │     Author:iceStone               ♬ ♪       
// │ └─────╯ └─╯ ╰─────╯ ╰───╮ │ │     Chinese:汪磊                              
// │                     ┌───╯ │ │                                              
// │                     ╰─────╯ │   ╠═╬═╬═╬═╬═╬═╬═╬═╬═╬═╬═╬═╬═╬═╬═╬═╬═╬═╬═╬═╬═╣
// ╰─────────────────────────────╯                                              
//------------------------------------------------------------------------------
using System.Configuration;

namespace Wedn.Net.Route.Configuration
{
    /// <summary>
    ///  路由配置节点解析
    /// </summary>
    public class RouteConfigurationSection : ConfigurationSection
    {
        /// <summary>
        /// 忽略
        /// </summary>
        [ConfigurationProperty("ignore", IsRequired = false)]
        public IgnoreCollection Ignore
        {
            get { return this["ignore"] as IgnoreCollection; }
            set { this["ignore"] = value; }
        }

        /// <summary>
        /// 匹配
        /// </summary>
        [ConfigurationProperty("map", IsRequired = false)]
        public RoutingCollection Map
        {
            get { return this["map"] as RoutingCollection; }
            set { this["map"] = value; }
        }

        /// <summary>
        /// 短路由配置
        /// </summary>
        [ConfigurationProperty("short", IsRequired = false)]
        public RoutingCollection Short
        {
            get { return this["short"] as RoutingCollection; }
            set { this["short"] = value; }
        }

        /// <summary>
        /// 拓展
        /// </summary>
        [ConfigurationProperty("extend", IsRequired = true)]
        public string Extend
        {
            get { return this["extend"].ToString(); }
            set { this["extend"] = value; }
        }
    }
}
